<template>
    <div class="tabbar">
        <router-link
            v-for="(item,index) in data"
            class="tab"
            :key="index"
            :to="item.path"
            tag="div"
            active-class="is-select"
        >
            <div :class=" 'icon iconfont '+item.icon "></div>
            <div class="tabtxet">{{item.name}}</div>
        </router-link>
    </div>
</template>

<script>
export default {
    name: "tabbar",
    props: {
        data: Array
    }
};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped lang="scss">
.tabbar {
    padding: 10px 0;
    background: #fff;
    display: flex;
    justify-content: space-around;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    .tab {
        width: 10%;
        .tabtxet {
            text-align: center;
            font-size: 14px;
            color: #76838f;
            text-decoration: none;
            margin-top: 5px;
        }
        .icon {
            text-align: center;
            color: #76838f;
            font-size: 20px;
        }
    }
    .is-select {
        .tabtxet {
            color: #196eff;
        }
        .icon {
            color: #196eff;
        }
    }
}
</style>
